import request from '@/request/index.js'

const zhpt = 'zhpt' //http://101.42.107.47:30018文档

//获取需求匹配列表
export const getDemandListApi = (data) => {
    return request({
        url: `/api/${zhpt}/demand/console/join/search`,
        method: 'POST',
        data,
    })
}

//获取成果匹配列表
export const getAchievementListApi = (data) => {
    return request({
        url: `/api/${zhpt}/result/console/join/search`,
        method: 'POST',
        data,
    })
}

//根据id查询详情----归档
export const getDetailsByIdApi = (params) => {
    return request({
        url: `/api/${zhpt}/match/console/find`,
        method: 'GET',
        params,
    })
}

//根据id查询详情----对接完成
export const getDetailsByIdFinishApi = (params) => {
    return request({
        url: `/api/${zhpt}/match/console/find/joinok`,
        method: 'GET',
        params,
    })
}

//删除对接结果
export const delAbutmentResultApi = (params) => {
    return request({
        url: `/api/${zhpt}/match/del`,
        method: 'GET',
        params,
    })
}

//补充对接金额
export const abutmentMoneyApi = (data) => {
    return request({
        url: `/api/${zhpt}/match/edit`,
        method: 'POST',
        data,
    })
}

//智能匹配科技成果---需求
export const matchScientificAchievementApi = (params) => {
        return request({
            url: `/api/${zhpt}/demand/match`,
            method: 'GET',
            params,
        })
    }
    //智能匹配科技成果---需求---专利
export const getPatentRecommendApi = (params) => {
    return request({
        url: `/api/${zhpt}/demand/match/patent`,
        method: 'GET',
        params,
    })
}

//新增匹配对接
export const addMatchApi = (data) => {
    return request({
        url: `/api/${zhpt}/match/add`,
        method: 'POST',
        data,
    })
}

//智能匹配科技成果---成果
export const matchScientificDemandApi = (params) => {
    return request({
        url: `/api/${zhpt}/result/match`,
        method: 'GET',
        params,
    })
}

//取消对接
export const cancelAbutmentApi = (data) => {
    return request({
        url: `/api/${zhpt}/match/cancel`,
        method: 'POST',
        data,
    })
}

//对接结果历史记录查询
export const getHistoryListApi = (data) => {
    return request({
        url: `/api/${zhpt}/match/find/history`,
        method: 'POST',
        data,
    })
}